import request from '@/utils/request'

// 查询菜单列表
export function listMenu(data) {
  return request({
    url: '/console/system/menu/getMenuList',
    method: 'post',
    data: data
  })
}

// 查询菜单详细
export function getMenu(data) {
  return request({
    url: '/console/system/menu/detail',
    method: 'post',
    data: data
  })
}

// 查询菜单下拉树结构
export function treeselect() {
  return request({
    url: '/console/system/menu/treeSelect',
    method: 'post'
  })
}

// 根据角色ID查询菜单下拉树结构
export function roleMenuTreeselect(data) {
  return request({
    url: '/console/system/menu/roleMenuTreeSelect',
    method: 'post',
    data: data
  })
}

// 新增菜单
export function addMenu(data) {
  return request({
    url: '/console/system/menu/addMenu',
    method: 'post',
    data: data
  })
}

// 修改菜单
export function updateMenu(data) {
  return request({
    url: '/console/system/menu/updateMenu',
    method: 'post',
    data: data
  })
}

// 删除菜单
export function delMenu(data) {
  return request({
    url: '/console/system/menu/deleteMenu',
    method: 'post',
    data: data
  })
}
